// run: $exec < input
#include <iostream>
#include <algorithm>

int main()
{
	long long n, h, k;
	std::cin >> n >> h >> k;
	long long tick = 0, now = 0;
	for (long long i = 0, x; i < n && std::cin >> x; i++)
		while (true) {
			if (now + x <= h) { now += x; break; }
			else {
				int t = (now + x - h + k - 1) / k;
				tick += t;
				now = std::max(0ll, now - t * k);
			}
		}
	tick += (now + k - 1) / k;
	std::cout << tick << '\n';
}

